<div id="layer">
    <div class="imgBox">
        <img src="__IMG__/photo-1.png" alt="">
    </div>
</div>
<style>
    .layer_box {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,.5);
        z-index: 10;
        display: none;
    }
    .layer_box .layer_content {
        width: 80%;
        margin: 0 auto;
        background-color: #fff;
        margin-top: 45%;
        padding: 3rem 0;
        text-align: center;
        font-size: 1.3rem;
        line-height: 2.3rem;
    }
    .layer_box .layer_content p {
        width: 80%;
        text-align: center;
        margin: 0 auto;
    }
    .layer_box .layer_content .btn {
        width: 100%;
        margin: 0 auto;
        overflow: hidden;
    }
    .layer_box .layer_content .btn a {
        float: left;
        width: 27.33%;
        margin: 2rem 0 0 4.5%;
        color: #fff;
        line-height: 2.5rem;
        text-align: center;
        border-radius: 3px;
        font-size: 1.3rem;
        box-sizing: border-box;
        background-color: #fe5900;
    }
</style>
<div class="layer_box">
    <div class="layer_content">
        <p>亲：你还不是会员</p>
        <p>开通了会员你的号码才能显示出来</p>
        <div class="btn">
            <a href="javascript:void(0)" class="clone">取消</a>
            <a href="{:U('Mobile/User/member_service',array('user_level'=>$level_id['level']))}">去开通</a>
            <a href="javascript:add()">继续发布</a>
        </div>

    </div>
</div>
<script>
    function add_msg_alert(){
       $(".layer_box").fadeIn(300);
    }

    function checkPhone(tel) {
        var reg = /(^1[3|4|5|7|8][0-9]{9}$)/;
        if (reg.test(tel)) {
            return true;
        }else{
            return false;
        };
    }


    $(".layer_box .clone").click(function(){
        $(".layer_box").fadeOut(300);
    })
    var height = $(window).height();
    $(".publish-material-info .list.photo .img_arr").click(function(){
        var src = $(this).find("img").attr("src"),
                img = $("#layer img");
        $("#layer").show().css({"visibility":"hidden"}).find(".imgBox img").attr("src" ,src);
        var time = setInterval(function(){
            img.css({"margin-top": (height-img.height())/2});
            setTimeout(function () {
                clearInterval(time);
                $("#layer").css({"visibility":"initial"}).fadeIn(300)
            },300)
        },100);
    });
    $("#layer").click(function(){
        $(this).fadeOut(300)
    });


   /* $(function(){
        var ImgArr = [];
        $('#addImg').diyUpload({
            url: '{:U("Api/Api/upload_multi")}',
            success: function (data) {
                console.log(data);
                if (data.error == 0) {
                    ImgArr.push(data)
                }
            },
            error: function (err) {
                console.info(err);
            },
            buttonText: '选择文件',
            chunked: true,
            chunkSize: 10000 * 1024,
            //最大上传的文件数量, 总文件大小,单个文件大小(单位字节);
            fileNumLimit: 7,
            fileSizeLimit: 500000 * 1024,
            fileSingleSizeLimit: 10000 * 1024,
        });

    })*/


    $(function(){

        $("#addImg").on("change",function(){
            lrz(this.files[0]).then(function (rst) {
                $.ajax({
                    url: "{:U('Api/Api/upload')}",
                    type: "post",
                    data: {img: rst.base64},
                    dataType: "json",
                    timeout: 200000,
                    error: function(e){
                        console.log(e);
                    },
                    success: function(data){
                        console.log(data)
                        Imgarr.push(data.url);
                        //Imgsrc = data.url;
                        if(data.status == 200){
                           // console.log(Imgsrc);
                            var html = "<li class='img_arr'><em>x</em><img src=' "+data.url+ "' ></li>";
                            $("#ul_upload").append(html);
                          //  layer.msg("上传成功",{icon:6,time:2000});
                        }
                    },
                });
                return rst;
            })
        })

    })
</script>

<link rel="stylesheet" href="__CSS__/LArea.css">
<script src="__JS__/LAreaData1.js"></script>
<script src="__JS__/LAreaData2.js"></script>
<script src="__JS__/LArea.js"></script>
<script>


    var area2 = new LArea();
    area2.init({
        'trigger': '#area',
        'valueTo': '#value',
        'keys': {
            id: 'value',
            name: 'text'
        },
        'type': 2,

        'data': [provs_data, citys_data, dists_data]
    });
</script>